//Kyle Marshall
//Assignment 3
//marshaky@onid.oregonstate.edu
//cs362

#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>

//testing the  council_room card within the cardEffect function in dominion.c
int main (int argc, char** argv) {
  int card = council_room;
  int bonus = 0;
  int i, actualNumBuys;
  int expectedNumBuys = 2;

  struct gameState G;
  int k[10] = {adventurer, gardens, embargo, village, minion, mine, cutpurse, 
           sea_hag, tribute, smithy};
  int seed = 1000;

  memset(&G, 23, sizeof(struct gameState)); 
  
  initializeGame(2, k, seed, &G);
  //initial hand
  for(i=0;i<5;i++){
  	printf("Card in hand %d\n", G.hand[0][i]);
  }
  printf("num buys %d\n",G.numBuys);

  cardEffect(card, 1, 1, 1, &G, 0, &bonus);
  //hand after function call
  actualNumBuys = G.numBuys;
  for(i=0;i<5;i++){
  	printf("Card in hand after call %d\n", G.hand[0][i]);
  }
  printf("num buys after call %d\n",actualNumBuys);

  assert(expectedNumBuys == actualNumBuys);

  printf("All tests passed\n");
return 0;
}